#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main(){
	int a, n, g = 0;
	int sum = 0;
	scanf("%d %d", &a, &n);
	for (double i = 1; i <= n; i++){
		g = g + (a*pow(10.0, i - 1));
		sum = sum + g;
	}
	printf("s = %ld", sum);

	return 0;
}
